package com.cxc.bridge;


public class Computer {

    protected  Brand brand;
    public Computer(Brand brand) {
        this.brand = brand;
    }
    void sale(){
        brand.sale();
    }
}
class Desktop extends Computer{

    public Desktop(Brand brand) {
        super(brand);
    }
    void sale(){
        super.sale();
        System.out.println("销售台式机");
    }
}

class Laptop extends Computer{

    public Laptop(Brand brand) {
        super(brand);
    }
    @Override
    void sale() {
        super.sale();
        System.out.println("销售笔记本");
    }
}